<?php
namespace Lyricist\Controller;
use  Common\Controller\LyricistController;
class ConfigController extends LyricistController {


    /**
     * @param $appid
     */
    public function cps_config()
    {
        $appid  =   I('post.appid','','htmlspecialchars');
        $data   =   array();
        if (! empty($appid))
        {

            switch ($appid)
            {
                case 'wx402ce3c8d9a9de9b':
                    $newUserJump    =   1;
                    $newAppid       =   'wxe180236290032484';
                    $newAppPath     =   'pages/index/index';
                    $showRedBag     =   1;
                    $bindappid      =   'wx402ce3c8d9a9de9b';
                    break;
                case 'wx47f3a2edad028bdf':
                    $newUserJump    =   0;
                    $newAppid       =   0;
                    $newAppPath     =   '';
                    $bindappid      =   '';
                    $showRedBag     =   0;
                    break;
                default:
                    $newUserJump    =   0;
                    $newAppid       =   0;
                    $newAppPath     =   '';
                    $bindappid      =   '';
                    $showRedBag     =   0;
            }

            $data['newUserJump']    =   $newUserJump;
            $data['newAppid']       =   $newAppid;
            $data['newAppPath']     =   $newAppPath;
            $data['oldAppPath']     =   'pages/index/index?';
            $data['bindappid']      =   $bindappid;
            $data['showRedBag']     =   $showRedBag;
            $this->returnData($data,'OK',200);
        }
    }
}
